- name: make /srv/web/fedora.im dir
  file: state=directory
        path=/srv/web/fedora.im
        owner=apache
        group=apache
        mode=0775
        setype=httpd_sys_content_t
        seuser=system_u
  tags:
  - fedora-web
  - fedora-web/fedora.im

- name: Copy some config files for {{website}}
  copy: >
    src={{item}} dest=/etc/httpd/conf.d/{{website}}/{{item}}
    owner=root group=root mode=0644
  with_items:
  - matrix.conf
  notify:
  - reload proxyhttpd
  tags:
  - fedora-web
  - fedora-web/fedora.im

- name: copy in some matrix files
  copy: >
    src={{item}} dest=/srv/web/fedora.im/{{item}}
    owner=root group=root mode=0644
  with_items:
  - .well-known-matrix-client-fedora-im
  - .well-known-matrix-server-fedora-im
  tags:
  - fedora-web
  - fedora-web/fedora.im

- name: grab some images from design
  get_url: >
    url={{item.src_url}} dest=/srv/web/fedora.im/{{item.dest}}
    owner=root group=root mode=0644
  with_items:
    - src_url: "https://pagure.io/design/issue/raw/files/067f51a8a711c49c6f67d635ca6cbdf78b599758d8074b0ac5b2e8b32610a9c1-fedora_logo.png"
      dest: fedora_logo.png
    - src_url: "https://pagure.io/design/issue/raw/files/2ed898c38cd64db8e9604f17c3f1bc15473f3d6d7f1575c102487d76d6f2777f-fedora-temp.png"
      dest: fedora_welcome.png
  tags:
  - fedora-web
  - fedora-web/fedora.im
